package txt2bib;

import java.util.LinkedList;

public class Authors {
	public LinkedList<Author> list = null;
	
	public Authors() {
		list = new LinkedList<Author>();
	}
	
	public void addAuthor(Author auth) {
		list.add(auth);
	}
	
	@Override
	public String toString()  {
		StringBuilder sb = new StringBuilder();
		Author[] aa = list.toArray(new Author[list.size()]);
		
		for (int i = 0; i < aa.length; i ++) {
			if (i == 0)
				sb.append(aa[i].toString());
			else
				sb.append(", ").append(aa[i].toString());
		} 
			
		
		return sb.toString();
	}
	
	public void setList(LinkedList<Author> list) {
		this.list = list;
	} 
}
